using System;
using System.Collections.Generic;

namespace com.googlecode.jenkins
{
    public class Job {

	    public enum JobStatus {
		    OK,
		    WARNING,
		    FAILED
	    }

        public static JobStatus create(String colorCode)
        {
            var codes = new Dictionary<String, JobStatus>
                {
                    {"blue", JobStatus.OK},
                    {"yellow", JobStatus.WARNING},
                    {"red", JobStatus.FAILED}
                };
            return codes[colorCode];
		}
	
	    String name;
	    JobStatus status;
	    public Job(String name, JobStatus status) {
		    this.name = name;
		    this.status = status;
	    }

        public string Name
        {
            get { return name; }
        }

        public JobStatus Status
        {
            get { return status; }
        }
    }

}

